import {
  FlowNodeOutputTypeEnum,
  FlowNodeTemplateTypeEnum,
  FlowNodeTypeEnum,
  NodeOutputKeyEnum,
  WorkflowIOValueTypeEnum,
} from '@/types/workflow/constant';
import { FlowNodeTemplateType } from '@/types/workflow/node';
import { getHandleConfig } from '../../utils';
import { Input_Template_Stream_MODE } from '../../input';

export const GetTimeModule: FlowNodeTemplateType = {
  id: FlowNodeTypeEnum.getTime,
  templateType: FlowNodeTemplateTypeEnum.tools,
  flowNodeType: FlowNodeTypeEnum.pluginModule,
  sourceHandle: getHandleConfig(true, true, true, true),
  targetHandle: getHandleConfig(true, true, true, true),
  avatar: 'getTime.svg',
  name: '时间',
  intro: '一个用于获取当前时间的工具。',
  showStatus: false,
  isTool: true,
  courseUrl: '/docs/workflow/modules/ai_chat/',
  version: '481',
  isFolded: true,
  inputs: [],
  pluginId: 'community-getTime',
  outputs: [
    {
      id: NodeOutputKeyEnum.time,
      key: NodeOutputKeyEnum.time,
      label: 'time',
      description: '当前时间',
      valueType: WorkflowIOValueTypeEnum.string,
      type: FlowNodeOutputTypeEnum.static,
    },
  ],
};
